package IOTest;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;

public class FileTest {
    public static void main(String[] args) throws IOException {
        //test1();
        //test2();
        File file = new File("./test.txt");
        System.out.println(file.getParent());
        System.out.println(file.getName());
        System.out.println(file.getPath());
        System.out.println(file.getAbsolutePath());
        System.out.println(file.getAbsolutePath());
        System.out.println(file.exists());
    }
    public static void test1() {
        File file = new File("d:/example/c/d/e");
        System.out.println(file.exists());
        System.out.println(file.mkdirs());
        File dest = new File("d:/example/D");
    }
    public static void test2(){
        File file = new File("d:/example");
        System.out.println(Arrays.toString(file.listFiles()));
        //File dest = new File("d:/example/c/d/e/D");
        //System.out.println(file.renameTo(dest));
    }
}
